package com.taotao.order.mapper;

import com.taotao.order.domain.Order;
import com.taotao.order.domain.PaymentFlow;
import com.taotao.product.domain.SkuInventoryQuantity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {

    /**
    * @Author ZhangYuQi
    * @Description 添加交易流水记录
    * @Date 下午7:54 2025/2/5
    * @Param [paymentFlow]
    * @return
    */
    void insertPaymentFlow(PaymentFlow paymentFlow);

    /**
    * @Author ZhangYuQi
    * @Description 根据流水号查询交易流水记录
    * @Date 下午8:38 2025/2/5
    * @Param [tradeNo]
    * @return
    */
    PaymentFlow selectByTradeNo(String tradeNo);

    /**
    * @Author ZhangYuQi
    * @Description 添加订单记录
    * @Date 下午7:10 2025/2/9
    * @Param [order]
    * @return
    */
    void insertOrder(Order order);

    /**
    * @Author ZhangYuQi
    * @Description 添加中间表
    * @Date 下午2:28 2025/2/11
    * @Param [id, skuOrders]
    * @return
    */
    void insertSkuOrder(@Param("id") Long id, @Param("skuOrders") List<SkuInventoryQuantity> skuOrders);
}
